package com.cookbook.database.data;

import com.cookbook.database.model.Share;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShareMapper {
    List<Share> selectWithOffset(
            @Param("offset") int offset,
            @Param("limit") int limit);

    List<Share> selectMySharesWithOffset(
            @Param("userId") Integer userId,
            @Param("offset") int offset,
            @Param("limit") int limit);

    void insert(@Param("share") Share share);

    Long deleteWithShareIdAndUserId(
            @Param("shareId") Integer shareId,
            @Param("userId") Integer userId);
}